<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
    <title>PHPXRef 0.7.1 : Tomato Project : Detail view of cache.class.php</title>
    <link rel="stylesheet" href="../../../sample.css" type="text/css">
    <link rel="stylesheet" href="../../../sample-print.css" type="text/css" media="print">
    <style id="hilight" type="text/css"></style>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff">
<table class="pagetitle" width="100%">
	<tr>
        <td valign="top" class="pagetitle">
            [ <a href="../../../index.html">Index</a> ] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_classes/index.html">Classes</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_functions/index.html">Functions</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_variables/index.html">Variables</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_constants/index.html">Constants</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_tables/index.html">Tables</a>]
        </td>
        <td align="right" class="pagetitle">
		    <h2 style="margin-bottom: 0px">PHP Cross Reference of Tomato Project</h2>
	    </td>
    </tr>
</table>


<!-- Generated by PHPXref 0.7.1 at Thu Sep 10 15:54:52 2020 -->
<!-- PHPXref (c) 2000-2010 Gareth Watts - gareth@omnipotent.net -->
<!-- http://phpxref.sourceforge.net/ -->

<script src="../../../phpxref.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
ext='.html';
relbase='../../../';
subdir='core/v0.1/z';
filename='cache.class.php.html';
cookiekey='phpxref';
handleNavFrame(relbase, subdir, filename);

// -->
</script>
<script language="JavaScript" type="text/javascript">
if (gwGetCookie('xrefnav')=='off')
  document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>');
else
  document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>');
</script>
<noscript>
<p class="navlinks">
[ <a href="../../../nav.html" target="_top">Show Explorer</a> ]
[ <a href="index.html" target="_top">Hide Navbar</a> ]
</p>
</noscript>
<script language="JavaScript" type="text/javascript">
<!--

document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>');
document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">');
document.writeln('<tr><td class="searchbox-title">');
document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>');
document.writeln('<\/td><\/tr>');

document.writeln('<tr><td class="searchbox-body" id="searchbox-body">');
document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>');
document.writeln('<a class="searchbox-body" href="../../../_classes/index.html">Class<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="classname"><br>');
document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../../../_functions/index.html">Function<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="funcname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_variables/index.html">Variable<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="varname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_constants/index.html">Constant<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="constname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_tables/index.html">Table<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="tablename"><br>');
document.writeln('<input type="submit" class="searchbox-button" value="Search">');
document.writeln('<\/form>');
document.writeln('<\/td><\/tr><\/table>');
document.writeln('<\/td><\/tr><\/table>');
// -->
</script>
<div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div>
<h2 class="details-heading"><a href="./index.html">/core/v0.1/z/</a> -> <a href="cache.class.php.source.html">cache.class.php</a> (summary)</h2>
<div class="details-summary">
<p class="viewlinks">[<a href="cache.class.php.source.html">Source view</a>]
[<a href="javascript:window.print();">Print</a>]
[<a href="../../../_stats.html">Project Stats</a>]</p>
<p><b>(no description)</b></p>
<table>
<tr><td align="right">File Size: </td><td>268 lines (11 kb)</td></tr>
<tr><td align="right">Included or required:</td><td>0 times</td></tr>
<tr><td align="right" valign="top">Referenced: </td><td>0 times</td></tr>
<tr><td align="right" valign="top">Includes or requires: </td><td>0 files</td></tr>
</table>
<h3>Defines 1 class</h3>
<div class="inset">
<p><b>cache::</b> (10 methods):<br>
&nbsp;&nbsp;<a href="#redis">Redis</a>()<br>
&nbsp;&nbsp;<a href="#memcached">Memcached</a>()<br>
&nbsp;&nbsp;<a href="#rlock">Rlock</a>()<br>
&nbsp;&nbsp;<a href="#mlock">Mlock</a>()<br>
&nbsp;&nbsp;<a href="#r">R</a>()<br>
&nbsp;&nbsp;<a href="#m">M</a>()<br>
&nbsp;&nbsp;<a href="#f">F</a>()<br>
&nbsp;&nbsp;<a href="#setfilecache">SetFileCache</a>()<br>
&nbsp;&nbsp;<a href="#setcachewindows">setCacheWindows</a>()<br>
&nbsp;&nbsp;<a href="#setcachelinux">setCacheLinux</a>()<br>
</p>
</div>
</div>
<br><div class="details-funclist">
<div class="details-classinfo">
<p class="details-classtitle">Class: <a name="cache"><b>cache</b></a>&nbsp;&nbsp;- <a href="../../../_classes/cache.html"><small>X-Ref</small></a>
</p>
<div class="inset"><table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="redis" onClick="logFunction('redis', 'cache.class.php.source.html#l10')" href="cache.class.php.source.html#l10">Redis</a>(array <a href="../../../_variables/c.html">$c</a> = null, bool <a href="../../../_variables/new.html">$new</a> = false)&nbsp;&nbsp;
<a href="../../../_functions/redis.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><i>No description</i></td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="memcached" onClick="logFunction('memcached', 'cache.class.php.source.html#l31')" href="cache.class.php.source.html#l31">Memcached</a>(array <a href="../../../_variables/c.html">$c</a> = null)&nbsp;&nbsp;
<a href="../../../_functions/memcached.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><i>No description</i></td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="rlock" onClick="logFunction('rlock', 'cache.class.php.source.html#l46')" href="cache.class.php.source.html#l46">Rlock</a>(<a href="../../../_variables/redis.html">$redis</a>, string <a href="../../../_variables/key.html">$key</a>, int <a href="../../../_variables/expire.html">$expire</a> = 0)&nbsp;&nbsp;
<a href="../../../_functions/rlock.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>redis锁<BR>
</b><BR><b>param:</b> redis redis 连接实例<br>
<b>param:</b> key 键名<br>
<b>param:</b> expire 获取锁的超时时间（秒）<br>
<b>return:</b> 成功返回锁的键名，否则返回false<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="mlock" onClick="logFunction('mlock', 'cache.class.php.source.html#l70')" href="cache.class.php.source.html#l70">Mlock</a>(<a href="../../../_variables/mem.html">$mem</a>, string <a href="../../../_variables/key.html">$key</a>, int <a href="../../../_variables/expire.html">$expire</a> = 0)&nbsp;&nbsp;
<a href="../../../_functions/mlock.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>memcached锁<BR>
</b><BR><b>param:</b> mem memcached 连接实例<br>
<b>param:</b> key 键名<br>
<b>param:</b> expire 获取锁的超时时间（秒）<br>
<b>return:</b> 成功返回锁的键名，否则返回false<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="r" onClick="logFunction('r', 'cache.class.php.source.html#l94')" href="cache.class.php.source.html#l94">R</a>(string <a href="../../../_variables/key.html">$key</a>, <a href="../../../_variables/data.html">$data</a> = null, int <a href="../../../_variables/expire.html">$expire</a> = null, int <a href="../../../_variables/lock.html">$lock</a> = 0)&nbsp;&nbsp;
<a href="../../../_functions/r.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Redis缓存操作<BR>
</b><BR><b>param:</b> key 缓存 key<br>
<b>param:</b> data 待写入的数据：为 null 时表示读取缓存，可以是一个回调函数，只在需要写入时调用<br>
<b>param:</b> expire 缓存时间：为假时表示不超时<br>
<b>param:</b> lock 并发锁<br>
<b>return:</b> 读取或写入的数据<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="m" onClick="logFunction('m', 'cache.class.php.source.html#l128')" href="cache.class.php.source.html#l128">M</a>(<a href="../../../_variables/key.html">$key</a>, <a href="../../../_variables/data.html">$data</a> = null, <a href="../../../_variables/expire.html">$expire</a> = null, <a href="../../../_variables/lock.html">$lock</a> = 0)&nbsp;&nbsp;
<a href="../../../_functions/m.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>Memcached缓存操作<BR>
</b><BR><b>param:</b> key 缓存 key<br>
<b>param:</b> data 待写入的数据：为 null 时表示读取缓存，可以是一个回调函数，只在需要写入时调用<br>
<b>param:</b> expire 缓存时间：为假时表示不超时<br>
<b>param:</b> lock 并发锁<br>
<b>return:</b> 读取或写入的数据<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="f" onClick="logFunction('f', 'cache.class.php.source.html#l162')" href="cache.class.php.source.html#l162">F</a>(<a href="../../../_variables/file.html">$file</a>, <a href="../../../_variables/data.html">$data</a> = null, <a href="../../../_variables/expire.html">$expire</a> = 0, <a href="../../../_variables/lock.html">$lock</a> = 0)&nbsp;&nbsp;
<a href="../../../_functions/f.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>文件缓存操作<BR>
</b><BR><b>param:</b> file 文件路径<br>
<b>param:</b> data 待写入的数据：为 null 时表示读取缓存，可以是一个回调函数，只在需要写入时调用<br>
<b>param:</b> expire 缓存时间：为假时表示不超时<br>
<b>param:</b> lock 并发锁<br>
<b>return:</b> 读取或写入的数据<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="setfilecache" onClick="logFunction('setfilecache', 'cache.class.php.source.html#l203')" href="cache.class.php.source.html#l203">SetFileCache</a>(<a href="../../../_variables/file.html">$file</a>, <a href="../../../_variables/data.html">$data</a>, <a href="../../../_variables/export.html">$export</a> = false)&nbsp;&nbsp;
<a href="../../../_functions/setfilecache.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>写入文件缓存<BR>
</b><BR><b>param:</b> file 文件路径<br>
<b>param:</b> data 待写入的数据：可以是一个回调函数，只在需要写入时调用<br>
<b>param:</b> export 数据为php代码<br>
<b>return:</b> 写入的数据<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="setcachewindows" onClick="logFunction('setcachewindows', 'cache.class.php.source.html#l216')" href="cache.class.php.source.html#l216">setCacheWindows</a>(<a href="../../../_variables/file.html">$file</a>, <a href="../../../_variables/data.html">$data</a>, <a href="../../../_variables/export.html">$export</a>)&nbsp;&nbsp;
<a href="../../../_functions/setcachewindows.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><i>No description</i></td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="setcachelinux" onClick="logFunction('setcachelinux', 'cache.class.php.source.html#l249')" href="cache.class.php.source.html#l249">setCacheLinux</a>(<a href="../../../_variables/file.html">$file</a>, <a href="../../../_variables/data.html">$data</a>, <a href="../../../_variables/export.html">$export</a>)&nbsp;&nbsp;
<a href="../../../_functions/setcachelinux.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><i>No description</i></td></tr></table>

<br>
</div>
</div>

</div>
<!-- A link to the phpxref site in your customized footer file is appreciated ;-) -->
<br><hr>
<table width="100%">
	<tr><td>Generated: Thu Sep 10 15:54:52 2020</td>
	<td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td>
	</tr>
</table>
</body></html>
